<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <title>Hello World!</title>
    <link href="css/index.css" rel="stylesheet">
    <style>
        * {
            font-size: 20px;
        }

        #href {
            color: blue;
        }

        .test {
            color: red;
        }

        p {
            border: red 2px solid;
        }

        div {
            border: 4px green solid;
            color: red;
        }
    </style>
</head>
<body>
<div>
    <a href="./http.html" target="_blank">http.html</a>
</div>
<div>
    <a href="http://hello/http/get/hello" target="_blank">http://hello/http/get/hello</a>
</div>
<hr/>
<div>
    <form id="form">
        <input id="name" value="老陈"/>
        <input id="age" value="55"/><br/>
        <input type="button" value="提交" onclick="save()"/>
        <input type="reset" value="重置" onclick="reset()"><br/>
    </form>
</div>
<div>
    结果：<span style="color: blue" id="result">原来的结果</span>adfasdfasdfadfa
</div>
</body>
</html>
<script src="js/jquery.3.2.1.min.js"></script>
<script src="js/main.js"></script>
<script>
    $('#href').html(location.href)
    $('#name').focus()
    let name = '您好'

    function save() {
        let data = {
            name: $('#name').val(),
            age: $('#age').val()
        }
        alert(`保存${JSON.stringify(data)}`)
        $('#result').html(`${JSON.stringify(data)}`)
    }

    function reset() {
        alert(`保存了${name}`)
    }
</script>



